package com.manage.competition.repository;

import com.manage.competition.entity.EnrollCollection;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.List;

/**
 * Create with IDEA
 *
 * @Author: gitee.com/KamisamaXX
 * @Date: Create in 9:21 2019/4/8
 * @Description:
 */
public interface EnrollCollectionRepository extends JpaSpecificationExecutor<EnrollCollection>, JpaRepository<EnrollCollection,Long> {
    List<EnrollCollection> findByUserId(long id);

    EnrollCollection findByUserIdAndCompetitionId(long userId, long competitionId);

    List<EnrollCollection> findByCompetitionId(long id);
}
